class code3 {
    //模拟匹配
    public boolean isSubsequence(String s, String t) {
        char[] ss = s.toCharArray();
        char[] tt = t.toCharArray();
        int cur = -1;
        for(int i=0;i<ss.length;i++) {
            char ch = ss[i];
            int flag = 0;
            for(int j=cur+1;j<tt.length;j++) {
                if(ch == tt[j]) {
                    flag = 1;
                    cur = j;
                    break;
                }
            }
            if(flag == 0) {
                return false;
            }
        }
        return true;
    }
}